package com.uit.httt04.duongvanlam.facedetection.classes;

public class ScoreAlgorithm extends Object
{
	private int id;
	private double score;

	public ScoreAlgorithm(int ID, double Score)
	{
		this.setId(ID);
		this.setScore(Score);
	}

	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public double getScore()
	{
		return score;
	}

	public void setScore(double score)
	{
		this.score = score;
	}

	public static void sort(ScoreAlgorithm[] scoreAlgorithms)
	{
		for (int i = 0; i < scoreAlgorithms.length - 1; i++)
			for (int j = i + 1; j < scoreAlgorithms.length; j++)
			{
				if (scoreAlgorithms[i].getScore() < scoreAlgorithms[j].getScore())
				{
					ScoreAlgorithm temporaryScoreAlgorithm = scoreAlgorithms[i];
					scoreAlgorithms[i] = scoreAlgorithms[j];
					scoreAlgorithms[j] = temporaryScoreAlgorithm;
				}
			}
	}

	@Override
	public void finalize() throws Throwable
	{
		super.finalize();
	}
}
